<div class="RoleList-tagContainer"
    ng-repeat="entry in access_list">
    <div class="RoleList-deleteContainer"
        ng-if="entry.explicit && entry.user_capabilities.unattach"
        ng-click="deletePermission(deleteTarget, entry)">
        <i ng-if="entry.explicit && entry.user_capabilities.unattach"
            class="fa fa-times RoleList-tagDelete"></i>
    </div>
    <div class="RoleList-tag"
        ng-class="{'RoleList-tag--deletable': entry.explicit && entry.user_capabilities.unattach,
            'RoleList-tag--team': entry.team_id}"
        aw-tool-tip='<div>Organization: {{ entry.team_organization_name | sanitize }}</div><div>Team: {{entry.team_name | sanitize}}</div>' aw-tip-placement='bottom'
        ng-if="entry.team_id">
        <span class="RoleList-name">{{ entry.name }}</span>
        <i ng-show='entry.team_id' class="fa fa-users"></i>
    </div>

    <div class="RoleList-tag"
        ng-class="{'RoleList-tag--deletable': entry.explicit && entry.user_capabilities.unattach,
            'RoleList-tag--team': entry.team_id}"
        ng-if="!entry.team_id && (entry.explicit || !entry.resource_type)">
        <span class="RoleList-name">{{ entry.name }}</span>
    </div>

    <div class="RoleList-tag"
        ng-class="{'RoleList-tag--deletable': entry.explicit && entry.user_capabilities.unattach,
            'RoleList-tag--team': entry.team_id}"
        aw-tool-tip='<div>Via {{ entry.parent_role_name | sanitize }} role on {{ entry.resource_type | sanitize }} {{entry.resource_name | sanitize}}</div>' aw-tip-placement='bottom'
        ng-if="!entry.team_id && !entry.explicit && entry.resource_type">
        <span class="RoleList-name">{{ entry.name }}</span>
        <i class="fa fa-sitemap"></i>
    </div>
</div>
